package ve.ucv.patologiaocular.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "CENTROMEDICO")
public class CentroMedico {
	private Integer id;
	private CentroDeSalud CentroDeSaludId = new CentroDeSalud();
	private Medico MedicoId = new Medico();
	
	@Id
	@GeneratedValue
	@Column(name = "ID")	
	public Integer getId() {
		return id;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}
	
	@ManyToOne(optional = false)    
	@JoinColumn(name = "CENTRODESALUD_ID")	
	public CentroDeSalud getCentroDeSaludId() {
		return CentroDeSaludId;
	}
	
	public void setCentroDeSaludId(CentroDeSalud centroDeSaludId) {
		CentroDeSaludId = centroDeSaludId;
	}
	
	@ManyToOne(optional = false)    
	@JoinColumn(name = "MEDICO_ID")
	public Medico getMedicoId() {
		return MedicoId;
	}
	
	public void setMedicoId(Medico medicoId) {
		MedicoId = medicoId;
	}
}
